import store from '@/store'
export default class Login {
	constructor(code) {
		return autoLogin(code)
	}
}

function autoLogin(code) {
	store.dispatch('Login', code).then((res) => {
		return res
	})
}
export function autoLogin1(code) {
	return new Promise((resolve, reject) => {
		store.dispatch('Login', code).then((res) => {
			resolve(res)
		}).catch(error => {
			reject(error)
		})
	})
}